﻿namespace LinFu.AOP.Interfaces
{
    using System.Threading;

    public class Counter<T>
    {
        #region Fields

        private int _count;

        #endregion Fields

        #region Methods

        public void Decrement()
        {
            Interlocked.Decrement(ref _count);
        }

        public int GetCount()
        {
            return _count;
        }

        public void Increment()
        {
            Interlocked.Increment(ref _count);
        }

        #endregion Methods
    }
}